{extend name="public/layer_base" /}
{block name='content'}
<!--数据列表页面-->
<div class="layui-fluid x-admin-sm">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">

    <!--顶部搜索筛选-->

 <div class="layui-card-body ">
                    <form class="layui-form layui-col-space5">
                        <div class="layui-inline layui-show-xs-block">
                            <input value="{$_keywords ? $_keywords : '' ;}" name="_keywords" id="_keywords"
                                class="layui-input"  placeholder="">
                        </div>
                         
                         
                        <div class="layui-inline layui-show-xs-block">
                            <button class="layui-btn" type="submit"><i class="layui-icon">&#xe615;</i> 查询</button>
                            
                           
                            <button class="layui-btn  layui-btn-primary" onclick="clearSearchForm()" type="reset"><i class="layui-icon layui-icon-delete"></i>清空查询</button>
                        </div>
                    </form>
                </div>
 

      <div class="layui-card-header">
                          <button class="layui-btn" onclick="xadmin.open('添加','{:url('add')}')"><i class="layui-icon"></i>添加</button>
                                 <button class="layui-btn layui-btn-danger AjaxButton" data-toggle="tooltip" title="删除选中数据" data-confirm-title="删除确认" data-confirm-content="您确定要删除选中的数据吗？" data-id="checked"  data-url="{:url('del')}"><i class="layui-icon"></i>删除</button>
                        
                    </div>
               
                   <div class="layui-card-body ">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                             <th>  <input type="checkbox" lay-filter="checkall" name="" lay-skin="primary">  </th>
                            <th>ID</th>
<th>名称</th>
<th>父级id</th>
<th>等级</th>
<th>排序</th>
<th>创建时间</th>

                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name='data' id='item' key='data_key'}
                        <tr>
                             <td>  <input type="checkbox" onclick="checkThis(this)" name="data-checkbox" data-id="{$item.id}" class="checkbox" value="{$item.id}" lay-skin="primary"  placeholder="选择/取消">
                                </td>
                            <td>{$item.id}</td>
<td>{$item.name}</td>
<td>{$item.pid}</td>
<td>{$item.level}</td>
<td>{$item.sort}</td>
<td>{$item.create_time}</td>

                            <td class="td-do">
                                <button onclick="xadmin.open('修改','{:url('edit',['id'=>$item.id])}')"  class="layui-btn  layui-bg-blue layui-btn-xs" title="修改"  >
                                    <i class="layui-icon fa-pencil"></i>
                                    
                                </button>
                                <button class="layui-btn layui-btn-danger AjaxButton layui-btn-xs" data-toggle="tooltip" title="删除"
                                        data-id="{$item.id}" data-confirm-title="删除确认"
                                        data-confirm-content='您确定要删除ID为 <span class="text-red">{$item.id}</span> 的数据吗'
                                        data-url="{:url('del')}">
     <i  class="layui-icon"></i>
    
</button>
                                
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>

                         <div class="layui-card-body ">
                    <div id="laypage">
                        <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-1">
                            <span class="layui-laypage-limits">
                                  <select lay-ignore="" onchange="changePerPage(this)">
                                    <option value="10" {if $admin.per_page==10}selected{/if}>10 条/页</option>
                                    <option value="30"  {if $admin.per_page==30}selected{/if}>30 条/页</option>
                                    <option value="50"  {if $admin.per_page==50}selected{/if}>50 条/页</option>
                                    <option value="100"  {if $admin.per_page==100}selected{/if}>100 条/页</option>
                                </select>
                            </span>
                            {$page|raw}
                        </div>


                    </div>
                </div>
            </div>
        </div>
    </div>

{/block}

